<?php
$ArBlockedMessages = Dracosys::getSessionValue(SESSION_INTERFACE, 'BlockedMessagesList');
?>
<h2>Mensagens Bloqueadas</h2>
<section id="BlockedMessage">
    <table id="BlockedMessages_blocked" class="list">
        <thead>
            <tr>
                <th>Usuario</th>
                <th>Data da Resposta</th>
                <th>Visualizar Chamado</th>
                <th>Ver Resposta</th>
            </tr>
        </thead>
        <tfoot>
        </tfoot>
        <tbody>
            <?php
            if (!empty($ArBlockedMessages)):
                foreach ($ArBlockedMessages as $Message):
                    ?>
                    <tr>
                        <td><?= $Message->getUsuario()->getArDadosUsuario('StNome') ?></td>
                        <td><?= $Message->getDtResposta() ?></td>
                        <td>
                            <a href="<?= DRA_URL ?>atendimento/visualizar-chamado/id/<?= $Message->getIDChamado() ?>"><img src="<?= DRA_VIEW_URL ?>images/descricao.png" alt="Visualizar Chamado" title="Visualizar Chamado" /></a>
                        </td>
                        <td>
                            <a href="<?= DRA_URL ?>mensagem/mensagem-bloqueada/id/<?= $Message->getIDMensagem() ?>"><img src="<?= DRA_VIEW_URL ?>images/message.png" alt="Visualizar Resposta" title="Visualizar Resposta" /></a>
                        </td>
                    </tr>
                    <?php
                endforeach;
            else:
                ?>
                <tr class="nodata">
                    <td colspan="5">
                        Nenhum resultado foi encontrado!
                    </td>
                </tr>
            <?php
            endif;
            ?>
        </tbody>
    </table>
</section>